package com.inforich.web.controller.statistics;

import com.inforich.common.core.domain.AjaxResult;
import com.inforich.projectManage.domain.Project;
import com.inforich.statistics.service.IStatisticsService;
import java.util.List;
import java.util.Map;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @description: 统计相关
 * @author: HJM
 * @date: 2022/11/20
 */
@RestController
@RequestMapping("/statistics")
public class StatisticsController {

  @Autowired
  private IStatisticsService statisticsService;

  /**
   * 总计(如项目总量)
   */
  @GetMapping("/totalData")
  public AjaxResult totalData() {
    return AjaxResult.success(statisticsService.totalData());
  }

  /**
   * 根据项目类型分类统计项目数量
   */
  @GetMapping("/groupProjectByKind")
  public AjaxResult groupProjectByKind() {
    return AjaxResult.success(statisticsService.groupProjectByKind());
  }

  /**
   * 根据公司统计预约单和运输单
   */
  @GetMapping("/groupBookingAndTransportByCompany")
  public AjaxResult groupBookingAndTransportByCompany() {
    return AjaxResult.success(statisticsService.groupProjectByKind());
  }

  /**
   * 根据月份统计预约单和运输单
   */
  @GetMapping("/groupBookingAndTransportByMonth")
  public AjaxResult groupBookingAndTransportByMonth() {
    return AjaxResult.success(statisticsService.groupBookingAndTransportByMonth());
  }

  /**
   * 根据月份统计处置厂称重数量
   */
  @GetMapping("/groupApproachByMonth")
  public AjaxResult groupApproachByMonth() {
    return AjaxResult.success(statisticsService.groupApproachByMonth());
  }

  /**
   * 根据处置厂统计处置厂称重数量
   */
  @GetMapping("/groupApproachByDisposal")
  public AjaxResult groupApproachByDisposal() {
    return AjaxResult.success(statisticsService.groupApproachByDisposal());
  }

}
